package com.app.repository.interfaces;

import com.app.model.main.CommentsOfArticle;

import java.util.List;

public interface CommentsOfArticleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CommentsOfArticle record);

    int insertSelective(CommentsOfArticle record);

    CommentsOfArticle selectByPrimaryKey(Long id);

    CommentsOfArticle selectByParam(long userId, String time);

    int updateByPrimaryKeySelective(CommentsOfArticle record);

    int updateByPrimaryKeyWithBLOBs(CommentsOfArticle record);

    int updateByPrimaryKey(CommentsOfArticle record);

    long getCommentsNumber(long articleId);

    List<CommentsOfArticle> getListOrderedByIdDESC(long articleId, long lastId, int page, int number);

    List<CommentsOfArticle> getListOrderedByIdASC(long articleId, long lastId, int page, int number);

    long getMaxId();

    List<CommentsOfArticle> getListByUserIdBetween(long userId, String time1, String time2);

    List<CommentsOfArticle> getListByUserId(long userId);
}